package com.feihao.zhou.BlockingQueueDemo;

import java.util.concurrent.ArrayBlockingQueue;

public class DemoTest {
    public static void main(String[] args) {
        //创建ArrayBlockingQueue对象：
        ArrayBlockingQueue<String> arrayBlockingQueue = new ArrayBlockingQueue(1);
        //创建Chihuo对象：
        ChiHuo chiHuo = new ChiHuo(arrayBlockingQueue);

        //创建Cooker对象：
        Cooker cooker = new Cooker(arrayBlockingQueue);

        new Thread(chiHuo).start();
        new Thread(cooker).start();
    }
}
